# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: chiku <chirantan.mitra@gmail.com>

pkgname=ucblogo
pkgver=6.2.4
pkgrel=1
pkgdesc='Interpreter for the Logo programming language'
url='https://www.cs.berkeley.edu/~bh/logo.html'
arch=(loong64 x86_64)
license=(GPL)
makedepends=(git texinfo texlive-bin texlive-core)
depends=(libice libsm libx11 ncurses wxwidgets-gtk3)
source=(configure.patch
        "$pkgname::git+https://github.com/jrincayc/ucblogo-code#commit=1eaef7d69d4c5c8c577d7de451cb96ef03fa9756") # tag: version_6.2.4
b2sums=('609a8a2304d6867a83a581dfa8065c05c6847c0983a29fce39efdfc18cfecfeca54989937f472c4339b2bc7fa4bce51951083d2d48b33614bf751dc67abd0e61'
        'SKIP')

prepare() {
  cd $pkgname
  patch -p1 -i ../configure.patch
  autoreconf -i
}

build() {
  cd $pkgname
  ./configure \
    --enable-docs \
    --prefix=/usr
  make
}

package() {
  make -C $pkgname \
    DESTDIR="$pkgdir" \
    INFODIR="$pkgdir/usr/share/info" \
    install
}
